FROM ubuntu:22.04

RUN apt-get update && \
apt-get install -y  openjdk-17-jdk  && \
apt install maven -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
mkdir ~/.m2/

ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/
ENV PATH=$JAVA_HOME/bin:$PATH

WORKDIR /workspace

VOLUME ~/.m2/settings.xml ~/.m2/settings.xml

EXPOSE 3000 8080 3306

CMD ["/bin/bash"]